:focus-visible {
  outline: none !important;
}

:root {
  --el-color-primary: #{$primary} !important;
  --el-color-primary-light-3: #{$primary3} !important;
  --el-disabled-text-color: #{$text} !important;
}
h3 {
  font-size: 14px;
}
.el-progress-bar {
  .el-progress-bar__outer {
    background-color: #ced2dc !important;
  }
}
//图标
.el-icon {
  &:not(:last-child) {
    margin-right: 4px;
  }
  &.el-color-picker__icon {
    margin-right: 0;
  }
}
//按钮
.el-button {
  & + .el-button {
    margin-left: 0 !important;
  }
  &.is-disabled {
    color: $info !important;
  }
  &.el-button--primary {
    &.is-disabled {
      color: $info !important;
      background-color: $bg !important;
      border-color: $border !important;
    }
  }
  .is-loading {
    margin-right: 0 !important;
    & + * {
      margin-left: 0 !important;
    }
  }
}
.el-popover {
  --el-popover-padding: 0 !important;
  max-height: 96vh;
  overflow-x: hidden;
  box-sizing: border-box;
  .popover-head {
    color: #000;
  }
}
//折叠菜单
.el-popper {
  overflow: hidden;
  .el-dropdown-menu--small {
    .el-dropdown-menu__item {
      padding: 2px 8px !important;
    }
  }
  .el-dropdown-menu__item {
    display: flex;
    align-items: center;
    > * {
      margin-right: 0;
      &:not(:last-child) {
        margin-right: 8px;
      }
    }
    p {
      flex: 1;
    }
    &.el-dropdown-title {
      padding: 0 8px;
      font-size: 10px;
      color: $info;
      cursor: text;
    }
  }
}

.el-descriptions {
  .el-descriptions__label {
    width: 120px;
  }
}

.el-divider {
  &.el-divider--vertical {
    margin: 0;
  }
}

.el-link {
  display: flex;
  align-items: center;
  .el-link__inner {
    > * {
      &:not(:last-child) {
        margin-right: 2px;
      }
    }
  }
}
//表格
.el-table {
  .primary-row {
    background: #eff2ff;
  }
  .success-row {
    background: #cbe9d6;
  }
  .error-row {
    background: #ffe0e1;
  }
  .cell {
    display: flex;
    align-items: center;
    min-height: 22px;
    line-height: 22px !important;
    .el-tag {
      margin: 0 auto;
    }
    &.el-tooltip {
      -webkit-line-clamp: 1; /* 限制文本显示的行数为2行 */
      -webkit-box-orient: vertical; /* 设置盒模型布局方向为垂直 */
      display: -webkit-box; /* 使用旧版WebKit内核布局盒模型 */
      overflow: hidden; /* 超出部分隐藏 */
      text-overflow: ellipsis; /* 使用省略号表示被截断的部分 */
      white-space: normal !important;
    }
  }
  thead {
    tr {
      th.el-table__cell {
        background: #fdfdfd !important;
        .cell {
          text-align: center;
          font-size: 12px;
        }
      }
    }
    .cell {
      color: $text;
      justify-content: center;
    }
  }
  tbody {
    .el-table__cell {
      .cell {
        color: $text;
      }
      &.is-center {
        .cell {
          justify-content: center;
        }
      }
    }
  }
  .el-table__footer {
    font-weight: bold;
  }
  .el-form-item__content {
    margin-left: 0 !important;
  }
}
//
.el-table-v2 {
  .el-table-v2__header {
    background: $bg;
    .el-table-v2__header-cell {
      background: $bg;
      color: #000;
      &:last-child {
        flex: 1 !important;
        width: 100% !important;
        min-width: 220px;
        > * {
          width: 100%;
        }
      }
    }
  }
  .el-table-v2__row {
    .el-table-v2__row-cell {
      &:last-child {
        flex: 1 !important;
        width: 100% !important;
        min-width: 220px;
        > * {
          width: 100%;
        }
      }
    }
  }
}
//
.el-message-box {
  .el-message-box__btns {
    > * {
      &:not(:last-child) {
        margin-right: 6px;
      }
    }
  }
}
//

.el-form-item {
  min-width: 20px; /* 根据实际需求调整 */
  .el-form-item__label {
    display: flex;
    align-items: center;
  }
  &:last-child {
    margin-bottom: 0;
  }
  .el-form-item__error {
    z-index: 2;
  }
}
//文本
.el-input {
  .el-input__inner {
    color: $text;
    resize: none;
  }
  &.is-disabled {
    .el-input__inner {
      color: $text !important;
    }
  }
  .el-select {
    background: #fff;
  }
  .el-input-group__append,
  .el-input-group__prepend {
    padding: 0 12px;
  }
}

.el-select {
  .el-select__tags {
    .el-select-tags-wrapper {
      margin-left: 6px !important;
    }
  }
  .el-tag__content {
    color: $text;
  }
}
.el-select-v2 {
  .el-select-v2__popper {
    .el-select-dropdown__option-item {
      font-size: 14px;
    }
  }
  .el-tag__content {
    color: $text;
  }
}

.el-divider {
  &.el-divider--horizontal {
    margin: 0;
  }
}

.el-drawer {
  .el-drawer__header {
    margin-bottom: 0;
    padding: 12px;
    border-bottom: 1px #eee solid;
    box-shadow: 0 4px 8px #00000008;
    .el-drawer__title {
      color: #000;
    }
  }
  .el-drawer__body {
    padding: 0;
  }
}

.jv-container {
  .jv-code {
    padding: 0 !important;
  }
  .jv-tooltip {
    .jv-button {
      color: $primary !important;
    }
    &.right {
      right: 0 !important;
    }
  }
}
